package main.java.com.yc.navy.snacknet.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yc.navy.snacknet.bean.AddrInfo;
import com.yc.navy.snacknet.mapper.IAddrInfoMapper;
import com.yc.navy.snacknet.service.IAddrInfoService;
import com.yc.navy.snacknet.util.StringUtil;




@Service
public class AddrInfoServiceImpl implements IAddrInfoService{
	
	@Autowired
	private IAddrInfoMapper addrInfoMapper;

	@Override
	public int add(AddrInfo af) {
		if(StringUtil.checkNull(af.getMno(), af.getName(), af.getTel(), af.getProvince(), af.getCity())) {
			return -100;
		}
		return addrInfoMapper.add(af);
	}

	@Override
	public List<AddrInfo> finds(Long mno) {
		return addrInfoMapper.finds(mno);
	}

	
}
